export const getImgInfo = (url: string) => {
  if (!url) {
    return {
      id: null,
      url: "",
      bucketName: "",
      fileName: "",
    };
  }
  const bucketName = "platform";
  const fileName = url.includes(`${bucketName}/`)
    ? url.split(`${bucketName}/`)[1]
    : url;
  const filename = fileName.split("/");
  const id = filename[filename.length - 1].split(".")[0];
  return {
    id,
    url,
    bucketName,
    fileName,
  };
};
